package cn.fjsay.java.demo5;

public class StudentTest {
    public static void main(String[] args) {
        Student[] studentArr = new Student[5];


        studentArr[0] = new Student(1, "Alice", 90);
        studentArr[1] = new Student(2, "Bob", 85);
        studentArr[2] = new Student(3, "Charlie", 92);
        studentArr[3] = new Student(4, "David", 88);
        studentArr[4] = new Student(5, "Eve", 95);
        // 创建5个Student对象并存入Student数组

        for (int i = 0; i < studentArr.length; i++) {
            Student s = studentArr[i];
            s.ShowMyInfo();
            // 遍历Student数组中的元素，输出学生的数据信息
        }
    }
}
